package com.goushu.pojo;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Customer {
    @NotNull
    private Integer id;
    @Pattern(regexp = "^\\S{5,16}$")
    private String username;
    private String password;
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String nickname;
    @Email
    private String email;
    private String phone;
    private String address;
    private String userPic;
    private Integer role;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
